﻿using FMusicReload.Utils;
using HandyControl.Controls;
using HTBInject.Utils;
using System;
using System.Windows.Input;

namespace FMusicReload.Views
{
    public partial class HomeView : SimplePanel
    {
        private LogHelper lh = new LogHelper("HomeView");
        public HomeView()
        {
            InitializeComponent();
            MainWindow.onSwitch += (id) => { };
            MainWindow.onSwitcher += (id) => { };

            Announce_Background.Background = StaticColorAssets.GetBasicColor();
            Announce_Background.BorderBrush = StaticColorAssets.GetBorderColor();

            Search.SearchStarted += (s, e) =>
            {
                ToSwitchSearchView(Search.Text);
                GC.Collect();
            };

            lh.SendLog("Interlize HomeView Done!", LogHelper.LogType.Info);
            GC.Collect();
        }

        public delegate void Switcher(string SearchText);
        public static event Switcher ToSwitchSearchView;

    }
}
